package org.system.core.domain.model;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author baoRoot
 */
@Component
@ConfigurationProperties(prefix = "system")
public class SystemConfiguration {
    private static String profile;
    private static boolean addressEnabled;

    public static String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        SystemConfiguration.profile = profile;
    }

    public static String getAvatarPath() {
        return getProfile() + "/avatar";
    }

    public static String getDownloadPath() {
        return getProfile() + "/download/";
    }

    public static String getImportPath() {
        return getProfile() + "/import";
    }

    public static String getDatabasePath() {
        return getProfile() + "/databases";
    }

    public void setAddressEnabled(boolean addressEnabled) {
        SystemConfiguration.addressEnabled = addressEnabled;
    }

}
